import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("fa_auth_rule",{schema:"fastadmin" } )
@Index("name",["name",],{unique:true})
@Index("pid",["pid",])
@Index("weigh",["weigh",])
export class fa_auth_rule {

    @PrimaryGeneratedColumn({
        type:"int", 
        name:"id"
        })
    id:number;
        

    @Column("enum",{ 
        nullable:false,
        default: () => "'file'",
        enum:["menu","file"],
        name:"type"
        })
    type:string;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"pid"
        })
    pid:number;
        

    @Column("varchar",{ 
        nullable:false,
        unique: true,
        length:100,
        name:"name"
        })
    name:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:50,
        name:"title"
        })
    title:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:50,
        name:"icon"
        })
    icon:string;
        

    @Column("varchar",{ 
        nullable:false,
        name:"condition"
        })
    condition:string;
        

    @Column("varchar",{ 
        nullable:false,
        name:"remark"
        })
    remark:string;
        

    @Column("tinyint",{ 
        nullable:false,
        default: () => "'0'",
        name:"ismenu"
        })
    ismenu:number;
        

    @Column("int",{ 
        nullable:true,
        name:"createtime"
        })
    createtime:number | null;
        

    @Column("int",{ 
        nullable:true,
        name:"updatetime"
        })
    updatetime:number | null;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"weigh"
        })
    weigh:number;
        

    @Column("varchar",{ 
        nullable:false,
        length:30,
        name:"status"
        })
    status:string;
        
}
